import request from '@/utils/request'


export function getAllGraph() {
  return request({
    url: '/api/graph/all/',
    method: 'get'
  })
}

export function searchGraphNodes(params) {
  return request({
    url: '/api/graph/search/',
    method: 'get',
    params
  })
}

export function generateKGGraph(data) {
  return request({
    url: '/api/graph/generate/',
    method: 'post',
    data
  })
}

export function changeUserInfo({ nick_name, phone, gender, icon }) {
  return request({
    url: '/api/user/',
    method: 'put',
    data: { nick_name, phone, gender, icon }
  })
}


export function deleteUser({ id }) {
  return request({
    url: `/api/user/list?id=${id}`,
    method: 'delete'
  })
}